#include <stdio.h>
#include <conio.h>

void main()
{
   int n;
   int num[100];
   int L;
   int desnum[100],k;
   int i,temp;
   printf("\nEnter the total number of marks to be entered: ");
   scanf("%d", &n);
   clrscr();
   for(L=0;L<n;L++)
   {
      printf("\n Enter the marks of student %d : ", L+1);
      scanf("%d", &num[L]);
   }
   for(k=0;k<n;k++)
   {
      desnum[k] = num[k]
   }
   for(i=0;i<n-1;i++)
   {
      for (j = i+1; j<n; j++)
      {
         if (desnum[i]<desnum[j])
         {
            temp = desnum[i];
            desnum[i] = desnum[j];
            desnum[j] = temp;
         }
      }
   }
   for(i=0;i<n;i++)
      printf("\nNumber at [%d] is %d", i, desnum[i]);
}
